/**
 * IBtreeSchemaTable.java
 * Copyright (C) 2011 Yuanyan<yuanyan.cao@gmail.com>
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; version 2 of the License.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * For information on how to redistribute this software under
 * the terms of a license other than GNU General Public License
 * contact yuanyan.cao@gmail.com
 */
package edu.rabbit.kernel.table;

import edu.rabbit.DbException;

/**
 * @author Yuanyan<yanyan.cao@gmail.com>
 * 
 * 
 */
public interface IBtreeSchemaTable extends IBtreeTable {

    int TYPE_FIELD = 0;
    int NAME_FIELD = 1;
    int TABLE_FIELD = 2;
    int PAGE_FIELD = 3;
    int SQL_FIELD = 4;

    String getTypeField() throws DbException;

    String getNameField() throws DbException;

    String getTableField() throws DbException;

    int getPageField() throws DbException;

    String getSqlField() throws DbException;

    long insertRecord(String typeField, String nameField, String tableField, int pageField, String sqlField)
            throws DbException;

    boolean goToRow(long rowId) throws DbException;

    long getRowId() throws DbException;

    /**
     * @param rowId
     * @param typeField
     * @param nameField
     * @param tableField
     * @param pageField
     * @param sqlField
     * @throws DbException
     */
    void updateRecord(long rowId, String typeField, String nameField, String tableField, int pageField, String sqlField)
            throws DbException;

}